Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 8 - Video Digitizer Components / Video Digitizer Components Reference
Video Digitizer Component Functions / Controlling Compressed Source Devices


VDSetCompression

The VDSetCompression function allows applications to specify some compression parameters.

pascal VideoDigitizerError VDSetCompression 
                           (VideoDigitizerComponent ci, 
                            OSType compressType, short depth,
                            Rect *bounds, CodecQ spatialQuality,
                            CodecQ temporalQuality, 
                            long keyFrameRate);
ci
Identifies the application's connection to the video digitizer component. An application obtains this value from the Component Manager's OpenComponent function.
compressType

Specifies a compressor type. This value corresponds to the component subtype of the compressor component. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for more information about compressor types and for valid values for this parameter.
depth
Specifies the depth at which the image is likely to be viewed. Compressors may use this as an indication of the color or grayscale resolution of the image. Values of 1, 2, 4, 8, 16, 24, and 32 indicate the number of bits per pixel for color images. Values of 33, 34, 36, and 40 correspond to 1-bit, 2-bit, 4-bit, and 8-bit grayscale images.
bounds
Contains a pointer to a rectangle that defines the desired boundaries of the compressed image.
spatialQuality

Indicates the desired image quality for each frame in the sequence. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for valid compression quality values.
temporalQuality

Indicates the desired temporal quality for the sequence as a whole. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for valid compression quality values.
keyFrameRate

Specifies the maximum number of frames to allow between key frames. This value defines the minimum rate at which key frames are to appear in the compressed sequence; however, the video digitizer may insert key frames more often than an application specifies. If the application requests no temporal compression (that is, the application set the temporalQuality parameter to 0), the video digitizer ignores this parameter.
For more information about key frames, see the chapter "Image Compression Manager" in Inside Macintosh: QuickTime.
DESCRIPTION
An application may use the VDSetCompression function to control the parameters that govern image compression. An application may change the compressor type, image depth, and boundary rectangle parameters only when the digitizer is stopped. However, if an application sets these three parameters (that is, the compressType, depth, and bounds parameters) to 0, it may work with the other parameters while digitization is active. This allows an application to vary the data rate during digitization.

RESULT CODES
noErr0No error
digiUnimpErr-2201Function not supported
qtParamErr-2202Invalid parameter value

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help